home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
101-125
/
scopedisk118
/
whap19
/
frqlib.lzh
/
lattice.test.c
< prev
next >
Wrap
C/C++ Source or Header
|
1990-01-17
|
1KB
|
64 lines
/*
* kd_freq.library Test for Lattice
*/
#include "KDBase.h"
UBYTE directory[128];
UBYTE filename[32];
UBYTE pattern[32];
struct Library *KD_FReqBase;
struct ExtraData extras;
/* FReq() prototype */
ULONG FReq(struct Screen *, UBYTE *, UBYTE *, UBYTE *,
UBYTE *, ULONG, struct ExtraData *);
void main()
{
KD_FReqBase = OpenLibrary(KLIBNAME,KLIBVERSION);
if (KD_FReqBase)
{
/* Make sure that all default strings are zero'd out. */
directory[0] = filename[0] = pattern[0] = 0;
/* Set default wildcard pattern */
/* strcpy(pattern,"#?.?"); */
/* Call file requester */
extras.oktext = (UBYTE *) "Load";
extras.canceltext = (UBYTE *) "No Way!";
if (FReq(NULL,"Test of 'kd_freq.library'",
filename,directory,pattern, FR_CANCELTEXT |
FR_OKTEXT | FR_AUTOPOSITION | FR_AUTOSIZE | FR_NOINFO | FR_SCREENFONT
,&extras))
{
/* You can immediately strcat(directory,filename); since
directory will contain the valid file seperator (either
\ or : at the end of the directory name
*/
puts(directory);
puts(filename);
}
else
{
puts("Requester Cancelled!");
}
CloseLibrary(KD_FReqBase);
}
else
{
puts("Can't Open 'kd_freq.library'. Make sure it is in LIBS:");
}
}